<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{cms>$thisForm.name}</title>
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link href="{cms>:RES}/css/style/css/hotels.css" rel="stylesheet" type="text/css">
<script src="{cms>:RES}/css/style/js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{cms>:$staticFilePath}/js/main.js"></script>
</head>
<body id="wrap">
	<style>
.deploy_ctype_tip {
	z-index: 1001;
	width: 100%;
	text-align: center;
	position: fixed;
	top: 50%;
	margin-top: -23px;
	left: 0;
}

.deploy_ctype_tip p {
	display: inline-block;
	padding: 13px 24px;
	border: solid #d6d482 1px;
	background: #f5f4c5;
	font-size: 16px;
	color: #8f772f;
	line-height: 18px;
	border-radius: 3px;
}
</style>
	<div class="banner">
		<div id="wrapper">
			<div id="scroller" style="float: none">
				<ul id="thelist">
					<li style="float: none">
						<p>{cms>$thisForm.name}</p>
						<if condition="$thisForm['logourl'] neq ''"> <a href="{cms>:U('Selfform/detail',array('token'=>$token,'id'=>$thisForm['id'],'wecha_id'=>$wecha_id))}">
							<img src="{cms>$thisForm.logourl}" alt="{cms>$thisForm.name}" style="width: 100%" />
						</a> </if>
					</li>
				</ul>
			</div>
		</div>
		<div class="clr"></div>
	</div>
	<div class="cardexplain">
		<if condition="$_GET['success'] eq 1">
		<ul class="round roundyellow" id="success">
			<li style="height: 40px; line-height: 40px; font-size: 16px; text-align: center">{cms>$thisForm.successtip}</li>
		</ul>
		<script type="text/javascript">
$(function() {
	$('#success').show().delay(1600).slideUp(1600);
	return;
});
</script> </if>
		<!--intro-->
		<ul class="round">
			<li>
				<h2>简介</h2>
				<div class="text">{cms>$thisForm['intro']}</div>
			</li>
			<li>
				<a href="{cms>:U('Selfform/detail',array('token'=>$token,'id'=>$thisForm['id'],'wecha_id'=>$wecha_id))}">
					<span style="color: #666">详细介绍</span>
				</a>
			</li>
		</ul>
		<if condition="$submitted neq 1">
		<form method="post" action="" id="form" onSubmit="return tgSubmit()">
			<ul class="round">
				<li class="title mb">
					<span class="none">请填写以下信息</span>
				</li>
				<volist name="list" id="item">
				<li class="nob">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
						<tr>
							<th>{cms>$item.displayname}</th>
							<td><if condition="$item['inputtype'] eq 'select'"> <select style="line-height: 35px;" id="{cms>$item.fieldname}" name="{cms>$item.fieldname}" class="dropdown-select">{cms>$item.optionStr}
								</select> <elseif condition="$item['inputtype'] eq 'text'" /> <input type="text" class="px" placeholder="请输入{cms>$item.displayname}" id="{cms>$item.fieldname}" name="{cms>$item.fieldname}" value="" /> <elseif condition="$item['inputtype'] eq 'textarea'" /> <textarea class="pxtextarea" style="height: 99px; overflow-y: visible" placeholder="请输入{cms>$item.displayname}" id="{cms>$item.fieldname}" name="{cms>$item.fieldname}"></textarea> </if></td>
						</tr>
					</table>
				</li>
				</volist>
			</ul>
			<div class="footReturn" style="text-align: center">
				<if condition="$submitted neq 1"> <input type="submit" style="margin: 0 auto 20px auto; width: 90%" class="submit" value="提交信息" /> </if>
			</div>
		</form>
		<else />
		<ul class="round">
			<li class="title mb">
				<span class="none">您提交的信息</span>
			</li>
			<!-- 
			<div style="margin: 10px 0; text-align: center; line-height: 26px;">
				您的二维码信息<br>
				<img src="{cms>:$imgSrc}" />
			</div> -->
			<volist name="submitInfo" id="item">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
				<li class="nob" style="height: 35px;">
				<tr>
					<th>{cms>$item.displayname}</th>
					<td>{cms>$item.value}</td>
				</tr>
				</li>
			</table>
			</volist>
			</li>
		</ul>
		</if>
		<script>
function showTip(tipTxt) {
	var div = document.createElement('div');
	div.innerHTML = '<div class="deploy_ctype_tip"><p>' + tipTxt + '</p></div>';
	var tipNode = div.firstChild;
	$("#wrap").after(tipNode);
	setTimeout(function () {
		$(tipNode).remove();
	}, 1500);
}
function tgSubmit(){
	//
	<volist name="list" id="item">
	var {cms>$item['fieldname']}=$("#{cms>$item['fieldname']}").val();
	<if condition="$item['require'] neq 0">
	if($.trim({cms>$item['fieldname']}) == ""){
		showTip('{cms>$item['errortip']}')
		return false;
	}
	</if>
	<if condition="$item['regex'] neq ''">
	var patrn = {cms>$item['regex']};
	if (!patrn.exec($.trim({cms>$item['fieldname']}))) {
		showTip('{cms>$item['errortip']}')
		return false;
	}
	</if>
	</volist>
	return true;
}
	</script>
	</div>
</body>
</html>